package com.example;

import com.example.config.NewBalancerConfiguration;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.loadbalancer.annotation.LoadBalancerClient;

@SpringBootApplication
//服务发现
@EnableDiscoveryClient
//实现自定义负载均衡
@LoadBalancerClient(value = "nacos-provider-demo",configuration = NewBalancerConfiguration.class)
public class NacosConsumerDemoApplication {
    public static void main(String[] args) {
        SpringApplication.run(NacosConsumerDemoApplication.class, args);
    }
}
